var __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (t, n) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, t) {
              e.__proto__ = t;
            }) ||
          function (e, t) {
            for (var n in t)
              Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
          })(t, n);
      };
      return function (t, n) {
        function o() {
          this.constructor = t;
        }
        if ("function" != typeof n && null !== n)
          throw new TypeError(
            "Class extends value " + String(n) + " is not a constructor or null"
          );
        e(t, n),
          (t.prototype =
            null === n
              ? Object.create(n)
              : ((o.prototype = n.prototype), new o()));
      };
    })(),
  battlefield = (function (e) {
    function t() {
      var t = e.call(this) || this;
      return (
        t.btn_battlefield_cancle.on(
          Laya.Event.CLICK,
          t,
          t.onBattleFiledCancleFn
        ),
        t.image_mixuetanbao.on(Laya.Event.CLICK, t, t.onMiXueTanBaoDidClickFn),
        t.image_baozangzhenduo.on(
          Laya.Event.CLICK,
          t,
          t.onBaoZangZhenDuoDidClickFn
        ),
        t.image_jinrufuben.on(Laya.Event.CLICK, t, t.onJinRuFuBenClickAction),
        t.image_daodaofuhui.on(Laya.Event.CLICK, t, t.onDanDaoFuHuiClickAction),
        t
      );
    }
    return (
      __extends(t, e),
      (t.showBattleView = function () {
        return (
          null == this.battleVC && (this.battleVC = new t()), this.battleVC
        );
      }),
      (t.prototype.onMiXueTanBaoDidClickFn = function () {
        WebSocketService.send({ c: 2e3, d: { id: 600 } });
        var e = tomb.showTombView();
        e.pos(0, 35), Laya.stage.addChild(e);
      }),
      (t.prototype.onBaoZangZhenDuoDidClickFn = function () {
        if (Global.roleLvl < 10) ToastView.toastView("等你10级以后再来抢宝吧");
        else {
          var e = forcejewel.showForceJewelView();
          e.pos(0, 35), Laya.stage.addChild(e);
        }
      }),
      (t.prototype.onJinRuFuBenClickAction = function () {
        var e = GameSecenMainView.showGameSecenView();
        e.pos(0, 35), Laya.stage.addChild(e), this.removeSelf();
      }),
      (t.prototype.onDanDaoFuHuiClickAction = function () {
        var e = KnifeMeetingMainView.showBattleView();
        e.pos(0, 35), Laya.stage.addChild(e);
      }),
      (t.prototype.onBattleFiledCancleFn = function () {
        this.removeSelf();
      }),
      t
    );
  })(ui.battlefield.battlefieldUI);
